package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbHouseOrderMapper;
import com.ruoyi.system.domain.TbHouseOrder;
import com.ruoyi.system.service.ITbHouseOrderService;

/**
 * 房屋订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-11
 */
@Service
public class TbHouseOrderServiceImpl implements ITbHouseOrderService 
{
    @Autowired
    private TbHouseOrderMapper tbHouseOrderMapper;

    /**
     * 查询房屋订单
     * 
     * @param id 房屋订单主键
     * @return 房屋订单
     */
    @Override
    public TbHouseOrder selectTbHouseOrderById(Long id)
    {
        return tbHouseOrderMapper.selectTbHouseOrderById(id);
    }

    /**
     * 查询房屋订单列表
     * 
     * @param tbHouseOrder 房屋订单
     * @return 房屋订单
     */
    @Override
    public List<TbHouseOrder> selectTbHouseOrderList(TbHouseOrder tbHouseOrder)
    {
        return tbHouseOrderMapper.selectTbHouseOrderList(tbHouseOrder);
    }

    /**
     * 新增房屋订单
     * 
     * @param tbHouseOrder 房屋订单
     * @return 结果
     */
    @Override
    public int insertTbHouseOrder(TbHouseOrder tbHouseOrder)
    {
        tbHouseOrder.setCreateTime(DateUtils.getNowDate());
        return tbHouseOrderMapper.insertTbHouseOrder(tbHouseOrder);
    }

    /**
     * 修改房屋订单
     * 
     * @param tbHouseOrder 房屋订单
     * @return 结果
     */
    @Override
    public int updateTbHouseOrder(TbHouseOrder tbHouseOrder)
    {
        return tbHouseOrderMapper.updateTbHouseOrder(tbHouseOrder);
    }

    /**
     * 批量删除房屋订单
     * 
     * @param ids 需要删除的房屋订单主键
     * @return 结果
     */
    @Override
    public int deleteTbHouseOrderByIds(Long[] ids)
    {
        return tbHouseOrderMapper.deleteTbHouseOrderByIds(ids);
    }

    /**
     * 删除房屋订单信息
     * 
     * @param id 房屋订单主键
     * @return 结果
     */
    @Override
    public int deleteTbHouseOrderById(Long id)
    {
        return tbHouseOrderMapper.deleteTbHouseOrderById(id);
    }
}
